package com.xmy.cultivate.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 订购学生
 * </p>
 *
 * @author hpiggy
 * @since 2025-01-04
 */
@TableName("book_student")
@ApiModel(value = "BookStudent对象", description = "订购学生")
@Data
public class BookStudent implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    private Long orderId;

    @ApiModelProperty("年份")
    private Integer yearPart;

    @ApiModelProperty("学期")
    private Integer quarterNum;

    @ApiModelProperty("教材类型，1学生用书，2教师用书，对应dict表type为33")
    private Integer bookTextType;

    @ApiModelProperty("校区id")
    private Long schoolId;

    @ApiModelProperty("书本id")
    private Long bookTextId;

    @ApiModelProperty("学生id")
    private Long studentId;

    @ApiModelProperty("科目id")
    private Long subjectsId;

    @ApiModelProperty("班型id")
    private Long classTypeId;

    @ApiModelProperty("订购时，学生所属的带班教师id")
    private Long teacherId;

    @ApiModelProperty("订购时所属的班级id")
    private Long gradeId;

    @ApiModelProperty("年级")
    private Integer yearClassId;

    @ApiModelProperty("课次【第几次】")
    private Integer lessonNum;

    @ApiModelProperty("1精品课")
    private Integer lessonType;

    @ApiModelProperty("0订购中，1已发放")
    private Integer status;

    @ApiModelProperty("1正常订购，2库存发放")
    private Integer type;

    private LocalDateTime grantDateTime;

    private Long grantId;

    private Integer deleted;

    @ApiModelProperty("创建人id")
    @TableField(fill = FieldFill.INSERT)
    private Long createdId;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("添加")
    private LocalDateTime createdAt;


    @TableField(exist = false)
    private String studentName;

    @TableField(exist = false)
    private String schoolName;

    @TableField(exist = false)
    private String yearClassName;

    @TableField(exist = false)
    private String subjectsName;

    @TableField(exist = false)
    private String classTypeName;

    /**
     * 教材名字
     */
    @TableField(exist = false)
    private String bookTextName;

    /**
     * 班级名字
     */
    @TableField(exist = false)
    private String gradeName;

    /**
     * 教材名字
     */
    @TableField(exist = false)
    private Integer count;

}
